 {% extends 'base.html' %} 
 {% block title %}{{ category_name_url }}{% endblock %}
 {% block body_block %}
 <div>
	<h1>Add a Page</h1>
</div>
<div>
	{% if not category_name_url %}
			<div style="color: red;"><h3>The specified category does not exist!</h3></div>
		{% else %}

	<form class="span6" id="page_form" method="post" action="/tango/category/{{category_name_url}}/add_page/">
		{% csrf_token %}
		{% for hidden in form.hidden_fields %}
		    {{ hidden }}
		 {% endfor %} 
		{% for field in form.visible_fields %}
		    {{ field.errors}}
		   <h5>{{field.help_text }}  {{ field }}</h5>
		{% endfor %}  
		<input class="btn btn-primary" type="submit" name="submit" value="Create Page"/>  
	 </form>
	 {%endif %}
</div>
 {% endblock %}